package com.l2jserver.gameserver.scripting.scriptengine.listeners.clan;

import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.scripting.scriptengine.events.ClanCreationEvent;
import com.l2jserver.gameserver.scripting.scriptengine.events.ClanLevelUpEvent;
import com.l2jserver.gameserver.scripting.scriptengine.impl.L2JListener;

/**
 * This class notifies of clan creation and
 * @author TheOne
 */
public abstract class ClanCreationListener extends L2JListener
{
	public ClanCreationListener()
	{
		register();
	}
	
	/**
	 * Fired when a clan is created
	 * @param event
	 */
	public abstract void onClanCreate(ClanCreationEvent event);
	
	/**
	 * Fired when a clan levels up
	 * @param event
	 * @return
	 */
	public abstract boolean onClanLevelUp(ClanLevelUpEvent event);
	
	@Override
	public void register()
	{
		L2Clan.addClanCreationListener(this);
	}
	
	@Override
	public void unregister()
	{
		L2Clan.removeClanCreationListener(this);
	}
}
